package com.mars.tukuan.dto;

import java.io.Serializable;
import java.util.Date;

import com.mars.base.common.utils.date.DateUtil;
import com.mars.tukuan.entity.CarState;

public class CarStateVo extends CarState implements Serializable {

	private static final long serialVersionUID = 1L;
	
	/**
	 * 日期范围：2014-04-12 至 2015-01-30
	 */
	private String dataRange ;
	
	/**
	 * 开始日期
	 */
	private Date startDate ;
	
	/**
	 * 结束日期
	 */
	private Date endDate ;
	
	//用户ID
	private Long userId ;
	
	//新伤上传人ID
	private String beforeUploadUserId ;
	
	//处理后上传人ID
	private String afterUploadUserId ;
	
	//新伤上传人
	private String beforeUploadUser ;

	//处理后上传人
	private String afterUploadUser ;
	
	//车牌号码
	private String carFullNum ;
	
	//Redis Hash中的Field
	private String hField ;
	
	public String gethField() {
		return hField;
	}

	public void sethField(String hField) {
		this.hField = hField;
	}

	public Long getUserId() {
		return userId;
	}

	public void setUserId(Long userId) {
		this.userId = userId;
	}

	public String getBeforeUploadUserId() {
		return beforeUploadUserId;
	}

	public void setBeforeUploadUserId(String beforeUploadUserId) {
		this.beforeUploadUserId = beforeUploadUserId;
	}

	public String getAfterUploadUserId() {
		return afterUploadUserId;
	}

	public void setAfterUploadUserId(String afterUploadUserId) {
		this.afterUploadUserId = afterUploadUserId;
	}

	public String getBeforeUploadUser() {
		return beforeUploadUser;
	}

	public void setBeforeUploadUser(String beforeUploadUser) {
		this.beforeUploadUser = beforeUploadUser;
	}

	public String getAfterUploadUser() {
		return afterUploadUser;
	}

	public void setAfterUploadUser(String afterUploadUser) {
		this.afterUploadUser = afterUploadUser;
	}

	public String getCarFullNum() {
		return carFullNum;
	}

	public void setCarFullNum(String carFullNum) {
		this.carFullNum = carFullNum;
	}

	public static long getSerialversionuid() {
		return serialVersionUID;
	}

	public String getDataRange() {
		return dataRange;
	}

	public void setDataRange(String dataRange) {
		this.dataRange = dataRange;
	}

	public Date getStartDate() {
		if(null != this.dataRange) {
			startDate = DateUtil.parseDate(this.getDataRange().replaceAll(" ", "").split("至")[0]) ;
		}
		return startDate;
	}

	public void setStartDate(Date startDate) {
		this.startDate = startDate;
	}

	public Date getEndDate() {
		if(null != this.dataRange) {
			endDate = DateUtil.parseDate(this.getDataRange().replaceAll(" ", "").split("至")[1]) ;
		}
		return endDate;
	}

	public void setEndDate(Date endDate) {
		this.endDate = endDate;
	}
}
